#ifndef IMAGE_PROCESS_H
#define IMAGE_PROCESS_H

#include <QObject>
#include <opencv2/opencv.hpp>
#include <QQueue>
#include <QMap>

class ImageProcess : public QObject
{
	Q_OBJECT

public:
	ImageProcess(QObject *parent);
	~ImageProcess();

	void process(const cv::Mat& image, cv::Mat& processImage);
	void receive();
	bool empty(QObject* object);
	cv::Mat read(QObject* object);

	void registerReceive(QObject* receiver, void (QObject::*slot)());
	void disregisterReceive(QObject* receiver);

signals:
	void processed();

private:
	QMap<QObject*, QQueue<cv::Mat>> queues;
	QMap<QObject*, QMetaObject::Connection> connections;
};

#endif
